//
//  CalendarViewController.h
//  YouthOlympic2014
//
//  Created by xiangpaopao on 14-6-20.
//  Copyright (c) 2014年 mitian. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"


#define TIMELINE_CELL_HEIGHT 100
#define CALENDARVIEW_HEIGHT 121
#define CALENDARVIEW_ROW_HEIGHT 38
#define HEADVIEW_HEIGHT 50
#define CONVIEW_HEIGHT 500

@interface CalendarViewController : UIViewController<UICollectionViewDataSource,UICollectionViewDelegate,
UICollectionViewDelegateFlowLayout,UIScrollViewDelegate>

@property(nonatomic,strong) IBOutlet UICollectionView *calendarView;
@property(nonatomic,strong) IBOutlet UICollectionView *miniCalendarView;
@property(nonatomic,strong) IBOutlet UIView *calendarHeaderView;

@property(nonatomic,strong) IBOutlet UIView *conView;
@property(nonatomic,strong) IBOutlet UITableView *eventListView;
@property(nonatomic,strong) IBOutlet UILabel* todayDisplaylb;
@property(nonatomic,strong) IBOutlet UILabel* weatherLb;
@property(nonatomic,strong) IBOutlet UIView *listHeaderView;


@property NSInteger eventListViewOffset;
//@property NSInteger calendarLoadDataCount;//用于记录日历加载的次数，防止后续刷新日历时默认选择当天

@property BOOL isReloadDataWithCompletion;//用于刷新tableview时锁住视图，不让其展开
@property BOOL isCalendarShowFull;
@property (nonatomic,strong) NSArray *dayArr;
@property (nonatomic, strong) UIImage *footerImage;
@property (nonatomic, strong) UIImageView *footerImageView;

@property (nonatomic,strong) NSString *todayStr;
@property (nonatomic) NSInteger selectedDayIndex;

@property (nonatomic,strong) NSDictionary* timeline;
@property (nonatomic,strong) NSArray* keys;

@property (nonatomic,strong) NSArray* dateMarks;

@property(nonatomic, strong)MBProgressHUD *HUD;

-(void)fixListViewHeight;
-(void)showFullCalendar:(BOOL)full;

- (void)initEventList;

- (void)reloadCalendarData;
- (void)reloadEventData;

-(void)initSelectedDay;

@end
